/* 绘画页面专用样式 */

/* 按钮样式 */
.toggle-params-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-params-btn:hover {
    background-color: #e0e0e0;
}

.toggle-params-btn.active {
    background-color: #e6f7ff;
    border-color: #91d5ff;
    color: #1890ff;
}

.toggle-params-btn i {
    font-size: 18px;
}

/* 参数面板样式 */
.params-panel {
    position: fixed;
    top: 60px;
    left: 260px;
    right: 0;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    padding: 15px;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.params-panel h3 {
    color: #333;
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* 在手机端响应式调整参数面板位置 */
@media (max-width: 768px) {
    .params-panel {
        left: 0;
        top: 60px;
    }
}

/* 当侧边栏收缩时调整参数面板位置 */
.sidebar.collapsed + .main-content .params-panel {
    left: 60px;
}

.param-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.param-group label {
    font-size: 14px;
    color: #555;
    min-width: 90px;
}

.param-group select {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    min-width: 100px;
}

.param-group input[type="range"] {
    flex: 1;
    min-width: 150px;
}

.param-group span {
    color: #1890ff;
    font-weight: bold;
    width: 40px;
    text-align: center;
}

/* 复选框样式 */
.param-group input[type="checkbox"] {
    margin-right: 6px;
}

/* 提示词输入区域 */
.draw-input-area {
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    position: relative;
    background-color: #fff;
    border-top: 1px solid #e6e6e6;
    padding: 15px 20px;
    min-height: 90px;
    max-height: 220px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.prompt-inputs {
    flex: 1;
}

.prompt-inputs textarea {
    width: 100%;
    resize: none;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    min-height: 70px;
    max-height: 180px;
    line-height: 1.5;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.prompt-inputs textarea:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.prompt-inputs textarea#negativePrompt {
    background-color: #fff8f8;
    border-color: #ffccc7;
    font-size: 0.9em;
}

/* 发送按钮样式调整 */
.draw-input-area .send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-left: 12px;
    flex-shrink: 0;
}

/* 生成状态指示器样式 */
.generation-status {
    background-color: #fff8e6;
    border-left: 4px solid #faad14;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    animation: pulse 2s infinite;
}

.generation-status p {
    margin: 0;
    font-size: 14px;
    color: #5c3c10;
    display: flex;
    align-items: center;
}

.generation-status p::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #faad14;
    margin-right: 8px;
    animation: blink 1s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

@keyframes blink {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* 欢迎界面 */
.drawing-welcome {
    text-align: center;
    padding: 20px;
}

.drawing-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
}

.drawing-tag {
    background-color: #f0f5ff;
    color: #1890ff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.drawing-tag:hover {
    background-color: #e6f7ff;
    transform: translateY(-2px);
}

.example-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.example-image {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.example-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.example-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.drawing-tips {
    text-align: left;
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 20px;
}

.drawing-tips h3 {
    color: #52c41a;
    margin-top: 0;
    font-size: 16px;
    margin-bottom: 10px;
}

.drawing-tips p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}

/* 当参数面板显示时，调整聊天区域顶部的间距 */
#paramsPanel:not([style*="display: none"]) + #chatArea {
    margin-top: 220px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .draw-input-area {
        padding: 10px 15px;
    }
    
    .prompt-inputs textarea {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .draw-input-area .send-btn {
        width: 42px;
        height: 42px;
    }
}

@media (min-width: 768px) {
    .draw-input-area .send-btn {
        width: 48px;
        height: 48px;
    }
}